import request from '@/utils/request'

// 奖品核销列表
export function drawIndex(params) {
    return request({
        url: '/manage/code/index',
        method: 'get',
        params
    })
}

// 线上列表
export function onlineIndex(params) {
    return request({
        url: '/manage/code/onlineIndex',
        method: 'get',
        params
    })
}
// 获取红包记录
export function coinIndex(params) {
    return request({
        url: '/manage/code/coinIndex',
        method: 'get',
        params
    })
}

// 核销码
export function destroyCode(params) {
    return request({
        url: '/manage/code/destroyCode',
        method: 'get',
        params
    })
}

// 撤回核销
export function revocationCode(data) {
    return request({
        url: '/manage/code/chanelDestroyCode',
        method: 'post',
        data
    })
}




export function codeOrder(data) {
    return request({
        url: '/manage/code/order',
        method: 'post',
        data
    })
}

export function setAddress(data) {
    return request({
        url: '/manage/code/setAddress',
        method: 'post',
        data
    })
}

export function selectOrder(params) {
    return request({
        url: '/manage/code/selectOrder',
        method: 'get',
        params
    })
}


export function indexExport(params) {
    return request({
        url: '/manage/code/indexExport',
        method: 'get',
        params
    })
}

export function onlineIndexExport(params) {
    return request({
        url: '/manage/code/onlineIndexExport',
        method: 'get',
        params
    })
}

export function coinIndexExport(params) {
    return request({
        url: '/manage/code/coinIndexExport',
        method: 'get',
        params
    })
}


export function subCodeFile(data) {
    return request({
        url: '/manage/code/subCodeFile',
        method: 'post',
        data
    })
}


